﻿using System.ServiceProcess;
using QuickPrompt.BusinessService;
using QuickPrompt.DomainModel;
using RedandBlue.RepositoryPattern.EF6;
using QuickPrompt.DataAccess;

namespace QuickPrompt.WindowsService
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        private static void Main()
        {
            var dataContext = new QuickPromptContext();
            var servicesToRun = new ServiceBase[]
            {
                new QuickPromptService(
                    new QuickNoteService(
                        new Repository<QuickNote>(
                            dataContext, 
                            new UnitOfWork(dataContext))))
            };
            ServiceBase.Run(servicesToRun);
        }
    }
}
